

#include <ctime>
#include <cstdlib>
//#include <unistd.h>
#include <iostream>
#include <iomanip>


#include "Field/Field.h"
#include "IO/IO.h"
#include "Config/Config.h"
#include "Log/Log.h"
#include "Time/Time.h"
#include "Mesh/Mesh.h"
#include "Record/RecordCollection.h"
#include "Math/Math.h"
#include "Parallel/ParallelMPI.h"

#include <Eigen/Dense>

int main (int argc, char* argv[])
{
    Eigen::Matrix2d mat;
    Eigen::Vector2d vec1;
    Eigen::Vector2d vec2;
    vec2 = mat * vec1 + vec1;






    std::vector<Matrix<double, 3, 3>> matrix3List;
    matrix3List.resize(10);

    std::cout << std::setw(9) << (long long)&matrix3List[0](0, 0) << std::endl;
    std::cout << std::setw(9) << (long long)&matrix3List[0](1, 0) << std::endl;
    std::cout << std::setw(9) << (long long)&matrix3List[0](2, 0) << std::endl;
    std::cout << std::endl;


    std::cout << std::setw(9) << (long long)&matrix3List[0](0, 0) << std::endl;
    //std::cout << std::setw(9) << (long long)&matrix3List[0].numberRow << std::endl;
    //std::cout << std::setw(9) << (long long)&matrix3List[0].numberCol << std::endl;
    //std::cout << std::setw(9) << (long long)&matrix3List[0].numberEle << std::endl;
    std::cout << std::setw(9) << (long long)&matrix3List[1](0, 0) << std::endl;
    std::cout << std::setw(9) << (long long)&matrix3List[2](0, 0) << std::endl;
    std::cout << std::setw(9) << (long long)&matrix3List[3](0, 0) << std::endl;
    std::cout << std::setw(9) << (long long)&matrix3List[4](0, 0) << std::endl;
    std::cout << std::endl;

    std::cout << std::setw(9) << (long long)&matrix3List[0] << std::endl;
    std::cout << std::setw(9) << (long long)&matrix3List[1] << std::endl;
    std::cout << std::endl;

    std::cout << sizeof(Matrix<double, 3, 3>) << " " << sizeof(matrix3List[0]) << std::endl;
    std::cout << std::endl;
    //std::cout << &matrix3List[0].data[0][0] << std::endl;
    //std::cout << &matrix3List[0].data[1][0] << std::endl;
    //std::cout << &matrix3List[0].data[2][0] << std::endl;
    //std::cout << std::endl;

    //std::cout << &(matrix3List[0]) << std::endl;
    //std::cout << &(matrix3List[1]) << std::endl;
    //std::cout << &(matrix3List[0].data[0][0]) << std::endl;
    //std::cout << &matrix3List[1].data[0][0] << std::endl;
    //std::cout << &matrix3List[2].data[0][0] << std::endl;
    //std::cout << std::endl;

    std::vector<double> matrix3List2;
    matrix3List2.resize(10);
    std::cout << &(matrix3List2[0]) << std::endl;
    std::cout << &(matrix3List2[1]) << std::endl;
    std::cout << std::endl;

    exit(0);





    //Creating ParallelMPI
    ParallelMPI* pmpi = new ParallelMPI(&argc, &argv);

    //Creating Log
    Log* log = new Log(pmpi);

    log_title("Start Simulation");

    log_title("Creating Config");
    Config* config = new Config(pmpi);

    log_title("Creating Simulation Time");
    SimulationTime* sim_time = new SimulationTime(config);
    

    //log_title("Creating IO");
    //IO* io = new IO(config, pmpi);


    log_title("Creating serial Mesh");
    Mesh* mesh = new Mesh(config);

    //log_title("Creating record collection");
    //RecordCollection* record_collection = new RecordCollection(config);
    //pmpi->barrier();




    //WallTime wall_time0("total time");

    //while(sim_time->loop())
    //{

    //    
    //}
    //wall_time0.update();

    log_title("End time loop");


    log_title("Time profile");
    //wall_time0.print();

    log_title("End");


    return 0;
}
